#include <myhead.h>
pthread_mutex_t mu1,mu2;
void*task(void*arg)
{
	while(1)
	{
		pthread_mutex_lock(&mu2);
		sleep(1);
		printf("B\n");
		pthread_mutex_unlock(&mu1);
	}
	return NULL;
}
int main(int argc, const char *argv[])
{
	pthread_mutex_init(&mu1,NULL);
	pthread_mutex_init(&mu2,NULL);
	pthread_mutex_lock(&mu2);
	pthread_t id;
	pthread_create(&id,NULL,task,NULL);
	while(1)
	{
		pthread_mutex_lock(&mu1);
		sleep(1);
		printf("A\n");
		pthread_mutex_unlock(&mu2);
	}
	return 0;
}
